home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / gplus-in / signal.h < prev    next >
C/C++ Source or Header  |  1992-08-12  |  2KB  |  77 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. /* 
  3. Copyright (C) 1989 Free Software Foundation
  4.     written by Doug Lea (dl@rocky.oswego.edu)
  5.  
  6. This file is part of the GNU C++ Library.  This library is free
  7. software; you can redistribute it and/or modify it under the terms of
  8. the GNU Library General Public License as published by the Free
  9. Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.  This library is distributed in the hope
  11. that it will be useful, but WITHOUT ANY WARRANTY; without even the
  12. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.  See the GNU Library General Public License for more details.
  14. You should have received a copy of the GNU Library General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18.  
  19. #ifndef _signal_h
  20.  
  21. #include <_G_config.h>
  22.  
  23. extern "C" {
  24.  
  25. #ifdef __signal_h_recursive
  26. #include_next <signal.h>
  27. #else
  28.  
  29. #define __signal_h_recursive
  30.  
  31. #define signal __hide_signal
  32. #define psignal __hide_psignal
  33. #include_next <signal.h>
  34. #undef signal
  35. #undef psignal
  36.  
  37. #define _signal_h 1
  38.  
  39. // The Interviews folks call this SignalHandler. Might as well conform.
  40. typedef _G_signal_return_type (*SignalHandler) (...);
  41. typedef int (*SSignalHandler) (...);
  42.  
  43. extern SignalHandler signal _G_ARGS((int sig, SignalHandler action));
  44. //extern SignalHandler sigset _G_ARGS((int sig, SignalHandler action));
  45. extern SSignalHandler ssignal _G_ARGS((int sig, SSignalHandler action));
  46. extern int           gsignal  _G_ARGS((int sig));
  47. extern int           kill  _G_ARGS((_G_pid_t pid, int sig));
  48. extern int           killpg _G_ARGS((int, int));
  49. extern int           siginterrupt _G_ARGS((int, int));
  50. extern void         psignal _G_ARGS((unsigned, const char*));
  51.  
  52. #ifndef hpux // Interviews folks claim that hpux doesn't like these
  53. extern int           sigsetmask _G_ARGS((int mask));
  54. extern int           sigblock _G_ARGS((int mask));
  55. extern int           sigpause _G_ARGS((int mask));
  56. extern int           sigvec _G_ARGS((int, struct sigvec*, struct sigvec*));
  57. #endif
  58.  
  59. // The Interviews version also has these ...
  60.  
  61. #define SignalBad ((SignalHandler)-1)
  62. #define SignalDefault ((SignalHandler)0)
  63. #define SignalIgnore ((SignalHandler)1)
  64.  
  65. #undef BADSIG
  66. #undef SIG_DFL
  67. #undef SIG_IGN
  68. #define BAD_SIG SignalBad
  69. #define SIG_DFL SignalDefault
  70. #define SIG_IGN SignalIgnore
  71.  
  72. #endif
  73. }
  74.  
  75. #endif
  76.  
  77.